home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Hyper / M-Md / MathTutor.cpt / Math / card_3325.txt < prev    next >
Encoding:
Text File  |  1990-08-02  |  35.6 KB  |  1,205 lines

  1. -- card: 3325 from stack: in
  2. -- bmap block id: 2077
  3. -- flags: 0000
  4. -- background id: 2580
  5. -- name: testCard
  6.  
  7.  
  8. -- part 46 (field)
  9. -- low flags: 00
  10. -- high flags: 0002
  11. -- rect: left=328 top=30 right=49 bottom=363
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 65535
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 256
  18. -- line height: 16
  19. -- part name: QuizCounter
  20.  
  21.  
  22. -- part 7 (field)
  23. -- low flags: 00
  24. -- high flags: 0002
  25. -- rect: left=226 top=30 right=49 bottom=261
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 65535
  29. -- font id: 3
  30. -- text size: 12
  31. -- style flags: 256
  32. -- line height: 16
  33. -- part name: counter
  34.  
  35.  
  36. -- part 1 (field)
  37. -- low flags: 01
  38. -- high flags: 0000
  39. -- rect: left=31 top=77 right=95 bottom=98
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 1
  43. -- font id: 3
  44. -- text size: 12
  45. -- style flags: 256
  46. -- line height: 16
  47. -- part name: firstNum
  48.  
  49.  
  50. -- part 2 (field)
  51. -- low flags: 01
  52. -- high flags: 0000
  53. -- rect: left=116 top=77 right=96 bottom=183
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 3
  58. -- text size: 12
  59. -- style flags: 256
  60. -- line height: 16
  61. -- part name: secondNum
  62.  
  63.  
  64. -- part 3 (field)
  65. -- low flags: 00
  66. -- high flags: 0000
  67. -- rect: left=196 top=77 right=96 bottom=289
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 0
  71. -- font id: 3
  72. -- text size: 12
  73. -- style flags: 256
  74. -- line height: 16
  75. -- part name: guess
  76. ----- HyperTalk script -----
  77. on enterInField
  78.   global numberRight, quizTotal, randomPick
  79.   if cd fld guess <> cd fld Answer then
  80.     answer "The correct answer is " & cd fld "Answer"
  81.   else
  82.     answer "You are correct!"
  83.     add 1 to numberRight
  84.   end if
  85.   if cd fld counter <> 10 then
  86.     put 1 + cd fld counter into cd fld counter
  87.     click at the loc of btn "Test"
  88.   else
  89.     answer "This quiz is over!"
  90.     put numberRight & return after cd fld "Individual" of card "scoreCard"
  91.     put 0 into cd fld counter
  92.     if cd fld quizCounter <> quizTotal then
  93.       answer "Do you wish to continue?" with "No" or "Yes"
  94.       if it is "Yes" then
  95.         showButtons
  96.         put 1 + cd fld quizCounter into cd fld quizCounter
  97.         if randomPick = "Yes" then
  98.           randomChoose
  99.           click at the loc of btn "Test"
  100.         end if
  101.       else
  102.         endQuiz
  103.       end if
  104.     else
  105.       endQuiz
  106.     end if
  107.   end if
  108. end enterInField
  109.  
  110. on endQuiz
  111.   global quizTotal
  112.   put 0 into cd fld quizCounter
  113.   answer "You have finished " & quizTotal*10 & " problems!" with "OK" or "Scores"
  114.   put 0 into quizTotal
  115.   if it is "Scores" then click at the loc of btn "Scores"
  116. end endQuiz
  117.  
  118.  
  119. -- part 4 (button)
  120. -- low flags: 00
  121. -- high flags: 8003
  122. -- rect: left=29 top=28 right=50 bottom=129
  123. -- title width / last selected line: 0
  124. -- icon id / first selected line: 0 / 0
  125. -- text alignment: 1
  126. -- font id: 0
  127. -- text size: 12
  128. -- style flags: 0
  129. -- line height: 16
  130. -- part name: Test
  131. ----- HyperTalk script -----
  132. on mouseUp
  133.   global numberRight
  134.   if cd fld quizCounter = 0 then put 1 into cd fld quizCounter
  135.   repeat with x = 3 to 22
  136.     put empty into cd fld x
  137.   end repeat
  138.   if cd fld counter < 2 then
  139.     put 1 into cd fld counter
  140.     put 0 into numberRight
  141.     repeat with x = 2 to 10
  142.       if the hilite of btn x is false then hide btn x
  143.     end repeat
  144.   end if
  145.   set the numberFormat to "#.#"
  146.   if the hilite of btn "Whole Num" is true then wholeNum
  147.   if the hilite of btn "Fractions" is true then Fraction
  148.   if the hilite of btn "Decimals" is true then Decimal
  149.   unlock screen
  150.   if the hilite of btn "Fractions" is false then
  151.     click at the loc of cd fld guess
  152.   else
  153.     click at the loc of cd fld FracWhole
  154.   end if
  155. end mouseUp
  156.  
  157. on wholeNum
  158.   show cd fld fracCover
  159.   hide cd fld cover
  160.   if the hilite of btn "Addition" is true then
  161.     put "+" into cd fld sign
  162.     put the random of 1000 into cd fld firstNum
  163.     put the random of 1000 into cd fld secondNum
  164.     put cd fld firstNum + cd fld secondNum into cd fld Answer
  165.   end if
  166.   if the hilite of btn "Subtraction" is true then
  167.     put "‚Äî" into cd fld sign
  168.     put 10 + the random of 1000 into cd fld firstNum
  169.     repeat forever
  170.       put the random of 1000 into cd fld secondNum
  171.       if cd fld secondNum <= cd fld firstNum then exit repeat
  172.     end repeat
  173.     put cd fld firstNum - cd fld secondNum into cd fld Answer
  174.   end if
  175.   if the hilite of btn "Multiplying" is true then
  176.     put "X" into cd fld sign
  177.     put the random of 100 into cd fld firstNum
  178.     put the random of 100 into cd fld secondNum
  179.     put cd fld firstNum * cd fld secondNum into cd fld Answer
  180.   end if
  181.   if the hilite of btn "Division" is true then
  182.     put "/" into cd fld sign
  183.     put the random of 1000 into cd fld firstNum
  184.     put the random of 1000 into cd fld secondNum
  185.     set the numberFormat to "#.##"
  186.     put cd fld firstNum/cd fld secondNum into cd fld Answer
  187.   end if
  188. end wholeNum
  189.  
  190. on Fraction
  191.   show cd fld cover
  192.   hide cd fld fracCover
  193.   lock screen
  194.   if the hilite of btn "Mixed" is true then
  195.     put the random of 10 into cd fld FracWhole1
  196.     put the random of 9 into cd fld FracWhole2
  197.   end if
  198.   if the hilite of btn "Addition" is true then
  199.     put "+" into cd fld divSign
  200.     put the random of 9 into cd fld Numer1
  201.     repeat forever
  202.       put the random of 10 into cd fld Denom1
  203.       if cd fld Denom1 > cd fld Numer1 then exit repeat
  204.     end repeat
  205.     put the random of 9 into cd fld Numer2
  206.     repeat forever
  207.       put the random of 10 into cd fld Denom2
  208.       if cd fld Denom2 > cd fld Numer2 then exit repeat
  209.     end repeat
  210.     if the hilite of btn "Mixed" is true then MixedFraction
  211.     else
  212.       put cd fld Numer1*cd fld Denom2+cd fld Numer2* cd fld Denom1 into cd fld "AnswerNum"
  213.     end if
  214.     put cd fld Denom1*cd fld Denom2 into cd fld "AnswerDenom"
  215.   end if
  216.   if the hilite of btn "Subtraction" is true then
  217.     put "‚Äî" into cd fld divSign
  218.     if the hilite of btn "Mixed" is true then
  219.       repeat forever
  220.         if cd fld FracWhole2 < cd fld FracWhole1 then exit repeat
  221.         put the random of 10 into cd fld FracWhole1
  222.         put the random of 9 into cd fld FracWhole2
  223.       end repeat
  224.     end if
  225.     put the random of 9 into cd fld Numer1
  226.     repeat forever
  227.       put the random of 10 into cd fld Denom1
  228.       if cd fld Denom1 > cd fld Numer1 then exit repeat
  229.     end repeat
  230.     repeat forever  --make sure second fraction is smaller
  231.       put the random of 9 into cd fld Numer2
  232.       repeat forever
  233.         put the random of 10 into cd fld Denom2
  234.         if cd fld Denom2 > cd fld Numer2 then exit repeat
  235.       end repeat
  236.       if the hilite of btn "Mixed" is false then
  237.         if cd fld Numer2/cd fld Denom2 < cd fld Numer1/cd fld Denom1 then
  238.           exit repeat
  239.         end if
  240.       else exit repeat
  241.     end repeat
  242.     if the hilite of btn "Mixed" is true then MixedFraction
  243.     else
  244.       put cd fld Numer1*cd fld Denom2-cd fld Numer2* cd fld Denom1 into cd fld "AnswerNum"
  245.     end if
  246.     put cd fld Denom1*cd fld Denom2 into cd fld "AnswerDenom"
  247.   end if
  248.   if the hilite of btn "Multiplying" is true then
  249.     put "X" into cd fld divSign
  250.     put the random of 9 into cd fld Numer1
  251.     repeat forever
  252.       put the random of 10 into cd fld Denom1
  253.       if cd fld Denom1 > cd fld Numer1 then exit repeat
  254.     end repeat
  255.     put the random of 9 into cd fld Numer2
  256.     repeat forever
  257.       put the random of 10 into cd fld Denom2
  258.       if cd fld Denom2 > cd fld Numer2 then exit repeat
  259.     end repeat
  260.     if the hilite of btn "Mixed" is true then MixedFraction
  261.     else
  262.       put cd fld Numer1*cd fld Numer2 into cd fld "AnswerNum"
  263.     end if
  264.     put cd fld Denom1 * cd fld Denom2 into cd fld AnswerDenom
  265.   end if
  266.   if the hilite of btn "Division" is true then
  267.     put "/" into cd fld divSign
  268.     put the random of 9 into cd fld Numer1
  269.     repeat forever
  270.       put the random of 10 into cd fld Denom1
  271.       if cd fld Denom1 > cd fld Numer1 then exit repeat
  272.     end repeat
  273.     put the random of 9 into cd fld Numer2
  274.     repeat forever
  275.       put the random of 10 into cd fld Denom2
  276.       if cd fld Denom2 > cd fld Numer2 then exit repeat
  277.     end repeat
  278.     if the hilite of btn "Mixed" is true then MixedFraction
  279.     else
  280.       put cd fld Numer1 * cd fld Denom2 into cd fld AnswerNum
  281.       put cd fld Denom1 * cd fld Numer2 into cd fld AnswerDenom
  282.     end if
  283.   end if
  284.   reduceProb
  285.   reduce
  286. end Fraction
  287.  
  288. on Decimal
  289.   show cd fld fracCover
  290.   hide cd fld cover
  291.   set the numberFormat to "#.##"
  292.   if the hilite of btn "Addition" is true then
  293.     put "+" into cd fld sign
  294.     put the random of 99 & "." & the random of 99 into cd fld firstNum
  295.     put the random of 99 & "." & the random of 99 into cd fld secondNum
  296.     put cd fld firstNum + cd fld secondNum into cd fld Answer
  297.   end if
  298.   if the hilite of btn "Subtraction" is true then
  299.     put "‚Äî" into cd fld sign
  300.     put 10+the random of 99 & "." & the random of 99 into cd fld firstNum
  301.     repeat forever
  302.       put the random of 99 & "." & the random of 99 into cd fld secondNum
  303.       if cd fld secondNum <= cd fld firstNum then exit repeat
  304.     end repeat
  305.     put cd fld firstNum - cd fld secondNum into cd fld Answer
  306.   end if
  307.   if the hilite of btn "Multiplying" is true then
  308.     put "X" into cd fld sign
  309.     put the random of 99 & "." & the random of 99 into cd fld firstNum
  310.     put the random of 99 & "." & the random of 99 into cd fld secondNum
  311.     put cd fld firstNum * cd fld secondNum into cd fld Answer
  312.   end if
  313.   if the hilite of btn "Division" is true then
  314.     put "/" into cd fld sign
  315.     put the random of 99 & "." & the random of 99 into cd fld firstNum
  316.     put the random of 99 & "." & the random of 99 into cd fld secondNum
  317.     put cd fld firstNum/cd fld secondNum into cd fld Answer
  318.   end if
  319. end Decimal
  320.  
  321. on MixedFraction
  322.   put cd fld FracWhole1*cd fld Denom1+cd fld Numer1 into FirstNumer
  323.   put cd fld FracWhole2*cd fld Denom2+cd fld Numer2 into SecondNumer
  324.   if the hilite of btn "Addition" is true then
  325.     put FirstNumer*cd fld Denom2+SecondNumer* cd fld Denom1 into cd fld "AnswerNum"
  326.   end if
  327.   if the hilite of btn "Subtraction" is true then
  328.     put FirstNumer*cd fld Denom2-SecondNumer* cd fld Denom1 into cd fld "AnswerNum"
  329.   end if
  330.   if the hilite of btn "Multiplying" is true then
  331.     put FirstNumer*SecondNumer into cd fld "AnswerNum"
  332.   end if
  333.   if the hilite of btn "Division" is true then
  334.     put FirstNumer*cd fld Denom2 into cd fld "AnswerNum"
  335.     put cd fld Denom1*SecondNumer into cd fld "AnswerDenom"
  336.   end if
  337. end MixedFraction
  338.  
  339. on reduce
  340.   if cd fld "AnswerNum" > cd fld "AnswerDenom" then
  341.     -- If the numerator is larger than the denominator
  342.     put cd fld "AnswerNum" div cd fld "AnswerDenom" into cd fld "MixFrac"
  343.     put cd fld "AnswerNum" mod cd fld "AnswerDenom" into cd fld "AnswerNum"
  344.   end if
  345.   repeat with x = min(cd fld "AnswerNum",cd fld "AnswerDenom") down to 2
  346.     if cd fld "AnswerNum" mod x = 0 and cd fld "AnswerDenom" mod x = 0 then
  347.       -- If both numbers divide evenly by the same number
  348.       put cd fld "AnswerNum"/x into cd fld "AnswerNum"
  349.       put cd fld "AnswerDenom"/x into cd fld "AnswerDenom"
  350.     end if
  351.   end repeat
  352.   if cd fld "AnswerDenom" = 1 then
  353.     add 1 to cd fld "MixFrac"
  354.     put empty into cd fld "AnswerNum"
  355.     put empty into cd fld "AnswerDenom"
  356.   end if
  357.   if cd fld "AnswerNum" = 0 then
  358.     put empty into cd fld "AnswerNum"
  359.     put empty into cd fld "AnswerDenom"
  360.   end if
  361. end reduce
  362.  
  363. on reduceProb
  364.   repeat with x = min(cd fld "Numer1",cd fld "Denom1") down to 2
  365.     if cd fld "Numer1" mod x = 0 and cd fld "Denom1" mod x = 0 then
  366.       -- If both numbers divide evenly by the same number
  367.       put cd fld "Numer1"/x into cd fld "Numer1"
  368.       put cd fld "Denom1"/x into cd fld "Denom1"
  369.     end if
  370.   end repeat
  371.   if cd fld "Numer1" = 0 then
  372.     put empty into cd fld "Numer1"
  373.     put empty into cd fld "Denom1"
  374.   end if
  375.   repeat with x = min(cd fld "Numer2",cd fld "Denom2") down to 2
  376.     if cd fld "Numer2" mod x = 0 and cd fld "Denom2" mod x = 0 then
  377.       -- If both numbers divide evenly by the same number
  378.       put cd fld "Numer2"/x into cd fld "Numer2"
  379.       put cd fld "Denom2"/x into cd fld "Denom2"
  380.     end if
  381.   end repeat
  382.   if cd fld "Numer2" = 0 then
  383.     put empty into cd fld "Numer2"
  384.     put empty into cd fld "Denom2"
  385.   end if
  386. end reduceProb
  387.  
  388.  
  389. -- part 5 (field)
  390. -- low flags: 80
  391. -- high flags: 0002
  392. -- rect: left=278 top=134 right=153 bottom=324
  393. -- title width / last selected line: 0
  394. -- icon id / first selected line: 0 / 0
  395. -- text alignment: 65535
  396. -- font id: 3
  397. -- text size: 12
  398. -- style flags: 256
  399. -- line height: 16
  400. -- part name: AnswerNum
  401.  
  402.  
  403. -- part 17 (button)
  404. -- low flags: 00
  405. -- high flags: 8006
  406. -- rect: left=401 top=48 right=70 bottom=501
  407. -- title width / last selected line: 0
  408. -- icon id / first selected line: 0 / 0
  409. -- text alignment: 1
  410. -- font id: 0
  411. -- text size: 12
  412. -- style flags: 0
  413. -- line height: 16
  414. -- part name: Addition
  415. ----- HyperTalk script -----
  416. on mouseUp
  417.   set the hilite of me to true
  418.   set the hilite of btn "Subtraction" to false
  419.   set the hilite of btn "Multiplying" to false
  420.   set the hilite of btn "Division" to false
  421. end mouseUp
  422.  
  423.  
  424.  
  425. -- part 18 (button)
  426. -- low flags: 00
  427. -- high flags: 8006
  428. -- rect: left=401 top=69 right=91 bottom=501
  429. -- title width / last selected line: 0
  430. -- icon id / first selected line: 0 / 0
  431. -- text alignment: 1
  432. -- font id: 0
  433. -- text size: 12
  434. -- style flags: 0
  435. -- line height: 16
  436. -- part name: Subtraction
  437. ----- HyperTalk script -----
  438. on mouseUp
  439.   set the hilite of me to true
  440.   set the hilite of btn "Addition" to false
  441.   set the hilite of btn "Multiplying" to false
  442.   set the hilite of btn "Division" to false
  443. end mouseUp
  444.  
  445.  
  446.  
  447. -- part 19 (button)
  448. -- low flags: 00
  449. -- high flags: C006
  450. -- rect: left=401 top=90 right=112 bottom=501
  451. -- title width / last selected line: 0
  452. -- icon id / first selected line: 0 / 0
  453. -- text alignment: 1
  454. -- font id: 0
  455. -- text size: 12
  456. -- style flags: 0
  457. -- line height: 16
  458. -- part name: Multiplying
  459. ----- HyperTalk script -----
  460. on mouseUp
  461.   set the hilite of me to true
  462.   set the hilite of btn "Addition" to false
  463.   set the hilite of btn "Subtraction" to false
  464.   set the hilite of btn "Division" to false
  465. end mouseUp
  466.  
  467.  
  468.  
  469. -- part 20 (button)
  470. -- low flags: 00
  471. -- high flags: 8006
  472. -- rect: left=401 top=111 right=133 bottom=501
  473. -- title width / last selected line: 0
  474. -- icon id / first selected line: 0 / 0
  475. -- text alignment: 1
  476. -- font id: 0
  477. -- text size: 12
  478. -- style flags: 0
  479. -- line height: 16
  480. -- part name: Division
  481. ----- HyperTalk script -----
  482. on mouseUp
  483.   set the hilite of me to true
  484.   set the hilite of btn "Addition" to false
  485.   set the hilite of btn "Subtraction" to false
  486.   set the hilite of btn "Multiplying" to false
  487. end mouseUp
  488.  
  489.  
  490.  
  491. -- part 21 (button)
  492. -- low flags: 00
  493. -- high flags: C006
  494. -- rect: left=401 top=167 right=189 bottom=501
  495. -- title width / last selected line: 0
  496. -- icon id / first selected line: 0 / 0
  497. -- text alignment: 1
  498. -- font id: 0
  499. -- text size: 12
  500. -- style flags: 0
  501. -- line height: 16
  502. -- part name: Whole Num
  503. ----- HyperTalk script -----
  504. on mouseUp
  505.   set the hilite of me to true
  506.   set the hilite of btn "Fractions" to false
  507.   set the hilite of btn "Decimals" to false
  508. end mouseUp
  509.  
  510.  
  511.  
  512. -- part 22 (button)
  513. -- low flags: 00
  514. -- high flags: 8006
  515. -- rect: left=401 top=194 right=216 bottom=501
  516. -- title width / last selected line: 0
  517. -- icon id / first selected line: 0 / 0
  518. -- text alignment: 1
  519. -- font id: 0
  520. -- text size: 12
  521. -- style flags: 0
  522. -- line height: 16
  523. -- part name: Fractions
  524. ----- HyperTalk script -----
  525. on mouseUp
  526.   set the hilite of me to true
  527.   set the hilite of btn "Whole Num" to false
  528.   set the hilite of btn "Decimals" to false
  529. end mouseUp
  530.  
  531.  
  532.  
  533. -- part 23 (button)
  534. -- low flags: 00
  535. -- high flags: 8006
  536. -- rect: left=401 top=266 right=288 bottom=501
  537. -- title width / last selected line: 0
  538. -- icon id / first selected line: 0 / 0
  539. -- text alignment: 1
  540. -- font id: 0
  541. -- text size: 12
  542. -- style flags: 0
  543. -- line height: 16
  544. -- part name: Decimals
  545. ----- HyperTalk script -----
  546. on mouseUp
  547.   set the hilite of me to true
  548.   set the hilite of btn "Whole Num" to false
  549.   set the hilite of btn "Fractions" to false
  550. end mouseUp
  551.  
  552.  
  553.  
  554. -- part 24 (field)
  555. -- low flags: 01
  556. -- high flags: 0000
  557. -- rect: left=98 top=77 right=96 bottom=116
  558. -- title width / last selected line: 0
  559. -- icon id / first selected line: 0 / 0
  560. -- text alignment: 0
  561. -- font id: 3
  562. -- text size: 12
  563. -- style flags: 256
  564. -- line height: 16
  565. -- part name: sign
  566.  
  567.  
  568. -- part 27 (field)
  569. -- low flags: 80
  570. -- high flags: 0002
  571. -- rect: left=278 top=154 right=173 bottom=324
  572. -- title width / last selected line: 0
  573. -- icon id / first selected line: 0 / 0
  574. -- text alignment: 65535
  575. -- font id: 3
  576. -- text size: 12
  577. -- style flags: 256
  578. -- line height: 16
  579. -- part name: AnswerDenom
  580.  
  581.  
  582. -- part 28 (field)
  583. -- low flags: 80
  584. -- high flags: 0002
  585. -- rect: left=231 top=142 right=161 bottom=277
  586. -- title width / last selected line: 0
  587. -- icon id / first selected line: 0 / 0
  588. -- text alignment: 65535
  589. -- font id: 3
  590. -- text size: 12
  591. -- style flags: 256
  592. -- line height: 16
  593. -- part name: MixFrac
  594.  
  595.  
  596. -- part 30 (field)
  597. -- low flags: 00
  598. -- high flags: 0000
  599. -- rect: left=30 top=217 right=237 bottom=60
  600. -- title width / last selected line: 0
  601. -- icon id / first selected line: 0 / 0
  602. -- text alignment: 65535
  603. -- font id: 3
  604. -- text size: 12
  605. -- style flags: 256
  606. -- line height: 16
  607. -- part name: FracWhole1
  608.  
  609.  
  610. -- part 31 (field)
  611. -- low flags: 01
  612. -- high flags: 0000
  613. -- rect: left=60 top=207 right=226 bottom=93
  614. -- title width / last selected line: 0
  615. -- icon id / first selected line: 0 / 0
  616. -- text alignment: 1
  617. -- font id: 3
  618. -- text size: 12
  619. -- style flags: 256
  620. -- line height: 16
  621. -- part name: Numer1
  622.  
  623.  
  624. -- part 32 (field)
  625. -- low flags: 01
  626. -- high flags: 0000
  627. -- rect: left=60 top=228 right=247 bottom=93
  628. -- title width / last selected line: 0
  629. -- icon id / first selected line: 0 / 0
  630. -- text alignment: 1
  631. -- font id: 3
  632. -- text size: 12
  633. -- style flags: 256
  634. -- line height: 16
  635. -- part name: Denom1
  636.  
  637.  
  638. -- part 33 (field)
  639. -- low flags: 00
  640. -- high flags: 0000
  641. -- rect: left=125 top=217 right=237 bottom=155
  642. -- title width / last selected line: 0
  643. -- icon id / first selected line: 0 / 0
  644. -- text alignment: 65535
  645. -- font id: 3
  646. -- text size: 12
  647. -- style flags: 256
  648. -- line height: 16
  649. -- part name: FracWhole2
  650.  
  651.  
  652. -- part 34 (field)
  653. -- low flags: 01
  654. -- high flags: 0000
  655. -- rect: left=156 top=207 right=226 bottom=191
  656. -- title width / last selected line: 0
  657. -- icon id / first selected line: 0 / 0
  658. -- text alignment: 1
  659. -- font id: 3
  660. -- text size: 12
  661. -- style flags: 256
  662. -- line height: 16
  663. -- part name: Numer2
  664.  
  665.  
  666. -- part 35 (field)
  667. -- low flags: 01
  668. -- high flags: 0000
  669. -- rect: left=156 top=228 right=246 bottom=191
  670. -- title width / last selected line: 0
  671. -- icon id / first selected line: 0 / 0
  672. -- text alignment: 1
  673. -- font id: 3
  674. -- text size: 12
  675. -- style flags: 256
  676. -- line height: 16
  677. -- part name: Denom2
  678.  
  679.  
  680. -- part 36 (field)
  681. -- low flags: 00
  682. -- high flags: 0000
  683. -- rect: left=228 top=217 right=237 bottom=258
  684. -- title width / last selected line: 0
  685. -- icon id / first selected line: 0 / 0
  686. -- text alignment: 65535
  687. -- font id: 3
  688. -- text size: 12
  689. -- style flags: 256
  690. -- line height: 16
  691. -- part name: FracWhole
  692. ----- HyperTalk script -----
  693. on enterInField
  694.   click at the loc of cd fld "NumerAns"
  695. end enterInField
  696.  
  697.  
  698. -- part 37 (field)
  699. -- low flags: 00
  700. -- high flags: 0000
  701. -- rect: left=259 top=207 right=226 bottom=294
  702. -- title width / last selected line: 0
  703. -- icon id / first selected line: 0 / 0
  704. -- text alignment: 1
  705. -- font id: 3
  706. -- text size: 12
  707. -- style flags: 256
  708. -- line height: 16
  709. -- part name: NumerAns
  710. ----- HyperTalk script -----
  711. on enterInField
  712.   click at the loc of cd fld "DenomAns"
  713. end enterInField
  714.  
  715.  
  716. -- part 38 (field)
  717. -- low flags: 00
  718. -- high flags: 0000
  719. -- rect: left=260 top=228 right=247 bottom=294
  720. -- title width / last selected line: 0
  721. -- icon id / first selected line: 0 / 0
  722. -- text alignment: 1
  723. -- font id: 3
  724. -- text size: 12
  725. -- style flags: 256
  726. -- line height: 16
  727. -- part name: DenomAns
  728. ----- HyperTalk script -----
  729. on enterInField
  730.   global numberRight, quizTotal
  731.   if cd fld NumerAns <> cd fld AnswerNum or cd fld DenomAns <> cd fld AnswerDenom or cd fld FracWhole <> cd fld MixFrac then
  732.     answer "The correct answer is " & cd fld "MixFrac" & " " & cd fld "AnswerNum" & "/" & cd fld "AnswerDenom"
  733.   else
  734.     answer "You are correct!"
  735.     add 1 to numberRight
  736.   end if
  737.   if cd fld counter <> 10 then
  738.     put 1 + cd fld counter into cd fld counter
  739.     click at the loc of btn "Test"
  740.   else
  741.     answer "This quiz is over!"
  742.     put numberRight & return after cd fld "Individual" of card "scoreCard"
  743.     put 0 into cd fld counter
  744.     if cd fld quizCounter <> quizTotal then
  745.       answer "Do you wish to continue?" with "No" or "Yes"
  746.       if it is "Yes" then
  747.         put 1 + cd fld quizCounter into cd fld quizCounter
  748.         click at the loc of btn "Test"
  749.       end if
  750.     else
  751.       put 0 into cd fld quizCounter
  752.       answer "You have finished " & quizTotal*10 & " problems!" with "OK" or "Scores"
  753.       put 0 into quizTotal
  754.       if it is "Scores" then click at the loc of btn "Scores"
  755.     end if
  756.   end if
  757. end enterInField
  758.  
  759.  
  760. -- part 40 (field)
  761. -- low flags: 01
  762. -- high flags: 0000
  763. -- rect: left=100 top=217 right=236 bottom=118
  764. -- title width / last selected line: 0
  765. -- icon id / first selected line: 0 / 0
  766. -- text alignment: 0
  767. -- font id: 3
  768. -- text size: 12
  769. -- style flags: 256
  770. -- line height: 16
  771. -- part name: divSign
  772.  
  773.  
  774. -- part 41 (field)
  775. -- low flags: 81
  776. -- high flags: 0002
  777. -- rect: left=185 top=102 right=121 bottom=278
  778. -- title width / last selected line: 0
  779. -- icon id / first selected line: 0 / 0
  780. -- text alignment: 0
  781. -- font id: 3
  782. -- text size: 12
  783. -- style flags: 256
  784. -- line height: 16
  785. -- part name: Answer
  786. ----- HyperTalk script -----
  787. on closeField
  788.   global numberRight
  789.   if the hilite of btn "Fractions" is false then
  790.     if cd fld guess <> cd fld Answer then
  791.       answer "The correct answer is " & cd fld "Answer"
  792.     else
  793.       answer "You are correct!"
  794.       add 1 to numberRight
  795.     end if
  796.   else
  797.     click at the loc of cd fld "Quotient"
  798.     exit closeField
  799.   end if
  800.   put empty into cd fld "guess"
  801.   if cd fld counter <> 10 then
  802.     put 1 + cd fld counter into cd fld counter
  803.     click at the loc of btn "Test"
  804.   else
  805.     answer "That's all folks!"
  806.     put 0 into cd fld counter
  807.     put "Your total correct was " & numberRight & ", for an accuracy of " & numberRight*10 & "%."
  808.   end if
  809. end closeField
  810.  
  811.  
  812. -- part 42 (button)
  813. -- low flags: 00
  814. -- high flags: 8006
  815. -- rect: left=426 top=215 right=238 bottom=501
  816. -- title width / last selected line: 0
  817. -- icon id / first selected line: 0 / 0
  818. -- text alignment: 1
  819. -- font id: 0
  820. -- text size: 12
  821. -- style flags: 0
  822. -- line height: 16
  823. -- part name: Regular
  824. ----- HyperTalk script -----
  825. on mouseUp
  826.   set the hilite of me to true
  827.   set the hilite of btn "Mixed" to false
  828. end mouseUp
  829.  
  830.  
  831.  
  832. -- part 43 (button)
  833. -- low flags: 00
  834. -- high flags: 8006
  835. -- rect: left=426 top=238 right=260 bottom=501
  836. -- title width / last selected line: 0
  837. -- icon id / first selected line: 0 / 0
  838. -- text alignment: 1
  839. -- font id: 0
  840. -- text size: 12
  841. -- style flags: 0
  842. -- line height: 16
  843. -- part name: Mixed
  844. ----- HyperTalk script -----
  845. on mouseUp
  846.   set the hilite of me to true
  847.   set the hilite of btn "Regular" to false
  848. end mouseUp
  849.  
  850.  
  851.  
  852. -- part 44 (button)
  853. -- low flags: 00
  854. -- high flags: 0000
  855. -- rect: left=464 top=291 right=324 bottom=501
  856. -- title width / last selected line: 0
  857. -- icon id / first selected line: 20098 / 20098
  858. -- text alignment: 1
  859. -- font id: 0
  860. -- text size: 12
  861. -- style flags: 0
  862. -- line height: 16
  863. -- part name: New Button
  864. ----- HyperTalk script -----
  865. on mouseUp
  866.   go Home
  867. end mouseUp
  868.  
  869.  
  870.  
  871. -- part 45 (button)
  872. -- low flags: 00
  873. -- high flags: 8003
  874. -- rect: left=31 top=301 right=323 bottom=131
  875. -- title width / last selected line: 0
  876. -- icon id / first selected line: 0 / 0
  877. -- text alignment: 1
  878. -- font id: 0
  879. -- text size: 12
  880. -- style flags: 0
  881. -- line height: 16
  882. -- part name: Scores
  883. ----- HyperTalk script -----
  884. on mouseUp
  885.   if visible of cd fld "About" is true then
  886.     set scroll of cd fld "About" to 1772
  887.   else
  888.     visual wipe left
  889.     go card "scoreCard"
  890.   end if
  891. end mouseUp
  892.  
  893.  
  894.  
  895. -- part 48 (button)
  896. -- low flags: 00
  897. -- high flags: 8003
  898. -- rect: left=166 top=301 right=323 bottom=266
  899. -- title width / last selected line: 0
  900. -- icon id / first selected line: 0 / 0
  901. -- text alignment: 1
  902. -- font id: 0
  903. -- text size: 12
  904. -- style flags: 0
  905. -- line height: 16
  906. -- part name: Reset
  907. ----- HyperTalk script -----
  908. on mouseUp
  909.   answer "Reset all scores and counters?" with "Yes" or "No"
  910.   if it is "Yes" then
  911.     lock screen
  912.     go card "scoreCard"
  913.     put empty into cd fld "Individual"
  914.     go card "testCard"
  915.     repeat with x = 1 to 22
  916.       put empty into cd fld x
  917.     end repeat
  918.     put 0 into cd fld "counter"
  919.     put 0 into cd fld "quizCounter"
  920.     show btn "Begin Quiz"
  921.   end if
  922. end mouseUp
  923.  
  924.  
  925.  
  926. -- part 49 (button)
  927. -- low flags: 00
  928. -- high flags: 8003
  929. -- rect: left=29 top=28 right=50 bottom=129
  930. -- title width / last selected line: 0
  931. -- icon id / first selected line: 0 / 0
  932. -- text alignment: 1
  933. -- font id: 0
  934. -- text size: 12
  935. -- style flags: 0
  936. -- line height: 16
  937. -- part name: Begin Quiz
  938. ----- HyperTalk script -----
  939. on mouseUp
  940.   global quizTotal, randomPick
  941.   showButtons
  942.   repeat forever
  943.     ask "How many quizzes? (1-20)"
  944.     if it < 21 and it > 0 then exit repeat
  945.     else if it is empty then exit mouseUp
  946.   end repeat
  947.   put it into quizTotal
  948.   put "No" into randomPick
  949.   answer "Pick method of problem selection‚Ķ" with "Manual" or "Random"
  950.   if it is "Random" then
  951.     randomChoose
  952.     put "Yes" into randomPick
  953.   end if
  954.   hide btn "Begin Quiz"
  955. end mouseUp
  956.  
  957.  
  958.  
  959. -- part 50 (field)
  960. -- low flags: 00
  961. -- high flags: 0001
  962. -- rect: left=176 top=77 right=98 bottom=200
  963. -- title width / last selected line: 0
  964. -- icon id / first selected line: 0 / 0
  965. -- text alignment: 0
  966. -- font id: 3
  967. -- text size: 12
  968. -- style flags: 0
  969. -- line height: 16
  970. -- part name: cover
  971.  
  972.  
  973. -- part 51 (field)
  974. -- low flags: 00
  975. -- high flags: 0001
  976. -- rect: left=52 top=216 right=237 bottom=298
  977. -- title width / last selected line: 0
  978. -- icon id / first selected line: 0 / 0
  979. -- text alignment: 0
  980. -- font id: 3
  981. -- text size: 12
  982. -- style flags: 0
  983. -- line height: 16
  984. -- part name: fracCover
  985.  
  986.  
  987. -- part 52 (button)
  988. -- low flags: 00
  989. -- high flags: 8003
  990. -- rect: left=410 top=300 right=322 bottom=453
  991. -- title width / last selected line: 0
  992. -- icon id / first selected line: 0 / 0
  993. -- text alignment: 1
  994. -- font id: 0
  995. -- text size: 12
  996. -- style flags: 0
  997. -- line height: 16
  998. -- part name: Info
  999. ----- HyperTalk script -----
  1000. on mouseUp
  1001.   set the scroll of cd fld "About" to 0
  1002.   lock screen
  1003.   show btn "Operation"
  1004.   show btn "Misc"
  1005.   show btn "General"
  1006.   show btn "Print Help"
  1007.   show cd fld "About"
  1008. end mouseUp
  1009.  
  1010.  
  1011.  
  1012. -- part 53 (field)
  1013. -- low flags: 81
  1014. -- high flags: 0007
  1015. -- rect: left=29 top=54 right=297 bottom=397
  1016. -- title width / last selected line: 0
  1017. -- icon id / first selected line: 0 / 0
  1018. -- text alignment: 0
  1019. -- font id: 3
  1020. -- text size: 12
  1021. -- style flags: 0
  1022. -- line height: 16
  1023. -- part name: About
  1024. ----- HyperTalk script -----
  1025. on mouseUp
  1026.   lock screen
  1027.   hide btn "Misc"
  1028.   hide btn "Operation"
  1029.   hide btn "General"
  1030.   hide btn "Print Help"
  1031.   hide me
  1032. end mouseUp
  1033.  
  1034.  
  1035. -- part 54 (button)
  1036. -- low flags: 80
  1037. -- high flags: 8003
  1038. -- rect: left=166 top=301 right=323 bottom=266
  1039. -- title width / last selected line: 0
  1040. -- icon id / first selected line: 0 / 0
  1041. -- text alignment: 1
  1042. -- font id: 0
  1043. -- text size: 12
  1044. -- style flags: 0
  1045. -- line height: 16
  1046. -- part name: Operation
  1047. ----- HyperTalk script -----
  1048. on mouseUp
  1049.   set scroll of cd fld "About" to 940
  1050. end mouseUp
  1051.  
  1052.  
  1053.  
  1054. -- part 55 (button)
  1055. -- low flags: 80
  1056. -- high flags: 8003
  1057. -- rect: left=29 top=28 right=50 bottom=129
  1058. -- title width / last selected line: 0
  1059. -- icon id / first selected line: 0 / 0
  1060. -- text alignment: 1
  1061. -- font id: 0
  1062. -- text size: 12
  1063. -- style flags: 0
  1064. -- line height: 16
  1065. -- part name: Misc
  1066. ----- HyperTalk script -----
  1067. on mouseUp
  1068.   set scroll of cd fld "About" to 2105
  1069. end mouseUp
  1070.  
  1071.  
  1072.  
  1073. -- part 57 (button)
  1074. -- low flags: 00
  1075. -- high flags: 8003
  1076. -- rect: left=296 top=300 right=322 bottom=396
  1077. -- title width / last selected line: 0
  1078. -- icon id / first selected line: 0 / 0
  1079. -- text alignment: 1
  1080. -- font id: 0
  1081. -- text size: 12
  1082. -- style flags: 0
  1083. -- line height: 16
  1084. -- part name: End Quiz
  1085. ----- HyperTalk script -----
  1086. on mouseUp
  1087.   answer "End this quiz? (Score will not count)" with "Yes" or "No"
  1088.   if it is "Yes" then
  1089.     lock screen
  1090.     repeat with x = 1 to 22
  1091.       put empty into cd fld x
  1092.     end repeat
  1093.     put 0 into cd fld "counter"
  1094.     put 0 into cd fld "quizCounter"
  1095.     show cd fld cover
  1096.     show cd fld fracCover
  1097.     show btn "Begin Quiz"
  1098.     showButtons
  1099.   end if
  1100. end mouseUp
  1101.  
  1102.  
  1103.  
  1104. -- part 56 (button)
  1105. -- low flags: 80
  1106. -- high flags: 8003
  1107. -- rect: left=296 top=300 right=322 bottom=396
  1108. -- title width / last selected line: 0
  1109. -- icon id / first selected line: 0 / 0
  1110. -- text alignment: 1
  1111. -- font id: 0
  1112. -- text size: 12
  1113. -- style flags: 0
  1114. -- line height: 16
  1115. -- part name: General
  1116. ----- HyperTalk script -----
  1117. on mouseUp
  1118.   set scroll of cd fld "About" to 0
  1119. end mouseUp
  1120.  
  1121.  
  1122.  
  1123. -- part 58 (button)
  1124. -- low flags: 80
  1125. -- high flags: 8003
  1126. -- rect: left=401 top=134 right=166 bottom=501
  1127. -- title width / last selected line: 0
  1128. -- icon id / first selected line: 0 / 0
  1129. -- text alignment: 1
  1130. -- font id: 0
  1131. -- text size: 12
  1132. -- style flags: 0
  1133. -- line height: 16
  1134. -- part name: Print Help
  1135. ----- HyperTalk script -----
  1136. on mouseUp
  1137.   lock screen
  1138.   go card "scoreCard"
  1139.   put cd fld "Individual" into indiv
  1140.   put cd fld "Correct" into corr
  1141.   put cd fld "Percent" into pct
  1142.   put cd fld "Grade" into grad
  1143.   repeat with x = 1 to 4
  1144.     put empty into cd fld x
  1145.   end repeat
  1146.   doMenu "Print Report..."
  1147.   put indiv into cd fld "Individual"
  1148.   put corr into cd fld "Correct"
  1149.   put pct into cd fld "Percent"
  1150.   put grad into cd fld "Grade"
  1151.   go card "testCard"
  1152. end mouseUp
  1153.  
  1154.  
  1155.  
  1156. -- part contents for card part 53
  1157. ----- text -----
  1158.                                   GENERAL
  1159. Use the buttons to quickly navigate. Click anywhere in this field to exit help. You may print this field by using "Print Help" (be sure CARD FIELDS is checked) and just click OK.
  1160.  
  1161.                      ***** MATH TUTOR *****
  1162.  
  1163.      This program is designed for those who need practice in the basic principles of math. It covers the four main operations: Addition, Subtraction, Multiplication, and Division.  It works with three types of numbers: Whole numbers, Fractions - both regular and mixed (5 1/2), and Decimals.  It randomly selects problems based on the buttons chosen at right.  You can even have the computer choose the buttons randomly for you. The number ranges used are as follows:
  1164.  
  1165.               Number Type                   Range
  1166.  
  1167.       Whole Number
  1168.               Multiplication                 1 - 100
  1169.               All others                       1 - 1000
  1170.       Fractions
  1171.               All types                         1 - 10
  1172.       Decimals
  1173.               All types                         1 - 100
  1174.  
  1175.     It may seem small for Fractions to be 1 - 10, but this just limits the fractions to tenths, and is quite sufficient to learn the principles involved.
  1176.     When using Decimals, the answers are resolved to an accuracy of two places to the right of the decimal. You must enter all significant digits to get the answer correct. For example, if the answer resolves to 29.30 then you need only 29.3, but if the answer resolves to 15.49 then you must enter 15.49 to be correct.  15.5 would be incorrect.  When using Division on the Whole Numbers, this two place accuracy also applies.
  1177.     When Subtraction is chosen, you may notice the computer occasionally taking a bit longer to choose the second number.  This is because it is set up to make sure the second number is smaller than the first. This avoids getting a negative answer. Such answers are not real numbers and are beyond the purpose of this program.
  1178.     Please be aware that the speed of this program is dependent on the machine used. On a Mac II or SE/30 the problems and operations will occur quickly.  On a Mac Plus or SE, there may be a small delay in some generation of problems, especially Fractions. The program is bug-free to the extent that I've tested it. So if you're using a slower machine and things don't seem to be happening, don't start clicking buttons because all those clicks will take effect when then computer catches up. If you really think things are stuck, hold down the Command key and period which will cancel a script in progress.
  1179.  
  1180.                                    OPERATION
  1181.  
  1182.     A set consists of up to twenty quizzes. To begin a set of quizzes, click on "Begin Quiz". This will prompt you to choose the number of quizzes you want in this set. You may choose any number up to 20. A quiz consists of 10 questions.  Next, you will be asked if you want to choose your type of problem manually or have the computer randomly choose for you. This choice will remain in effect during the entire set of quizzes unless you choose to reset the scores.
  1183.     To start the quiz, click on the "Test" button and the computer will generate a problem based on the choices selected. At the end of the quiz (if you chose more than 1 quiz in the set), you will be asked if you wish to continue. If you choose YES, the next quiz starts automatically. If you chose "Random" at the start of the set, your type of problem may change. Otherwise, you may choose another type of problem before clicking on the "Test" button. If you choose NO then the set ends and the counters are reset.
  1184.     If you wish to end a quiz early, click on the "End Quiz" button. Answers for that quiz will not be included in the totals.
  1185.     You can see what Problem and Quiz number you are currently at by the counters on top.
  1186.     To answer the problem, enter your guess and hit the Enter key to continue. When doing Fractions, this also lets you go from field to field.  When doing Fractions, the initial field to enter is the whole number field. If you don't have a whole number in your answer, hit Enter to go to the numerator field. If you enter a number in the wrong field and need to go back to it, simply click in that field to enter another number. Naturally, this doesn't apply if you enter a wrong number in the last field. At that point, you will get a message that you are correct, or one that shows you the correct answer. The program will keep track of all your correct answers and accumulate the score on the score card.
  1187.     At the end of the set you will be shown the number of questions answered and the choice to go to the scores or not.
  1188.     ***When dealing with Fractions, be aware that the program will reduce all fractions to the simplest terms.  This means that if you figure the answer should be 3 4/6, the answer is really 3 2/3.  If your answer comes out 14  35/91, the computer's answer will be 14  5/13.  There will not be any improper fractions used (where the numerator is larger than the denominator).  They will be reduced to mixed fractions.
  1189.  
  1190.                                     SCORES
  1191.  
  1192.     At the end of the set of quizzes, you will have a choice of going to the score card.  Actually, you can go to the scores at any time by clicking on the "Scores" button.  If you do this during a quiz, however, you will have to click in the answer field when you return to the quiz card to resume the quiz.  It's best to wait at least until a quiz is over.  On the score card, you can see the scores of each quiz, your number correct, your percentage correct and a grade.  To be sure this is accurate, click on the "Compute" button.  If no scores have been recorded, the "Compute" button does nothing. Clicking on the "OK" button returns you to the quiz card, and if at the end of a set, it will reset the scores and counters.
  1193.     At any time, you may click on the "Reset" button which will reset all scores of the current set and zero the Problem and Quiz counters.  You will be asked to verify this action first.
  1194.  
  1195.                             ABOUT THE PROGRAM
  1196.  
  1197.     This program was originally written to help my high school son, Chris. It is sad, but true, that kids today often do not know the basic skills they will need in their day-to-day lives.  I created this to help Chris, and it came out so good, I thought it would be useful and appreciated by those who needed it.  If you are one of those than please enjoy.  If you have any problems or questions, please contact me on GEnie.  My address is D.MCGREGOR1, I'll get right back to you.
  1198.  
  1199. -- part contents for card part 7
  1200. ----- text -----
  1201. 0
  1202.  
  1203. -- part contents for card part 46
  1204. ----- text -----
  1205. 0